package org.ligson.se.webapp.controller;

import org.ligson.se.api.UserApi;
import org.ligson.se.api.vo.User;
import org.ligson.se.api.vo.WebResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserApi userApi;

    @RequestMapping("/save")
    @ResponseBody
    public WebResult save() {
        return userApi.save(new User());
    }
}
